<template>
	<view>
		<home v-if="PageCur=='home'"></home>
		<publish v-else-if="PageCur=='publish'" :navChange="navChange"></publish>
		<mine v-else></mine>
		<view class="cu-bar tabbar bg-white foot">
			<view class="action text-green" @click="navChange('home', $event)">
				<view :class="PageCur=='home'?'cuIcon-homefill':'cuIcon-home'"></view>
				<view :class="PageCur=='home'?'':'text-gray'">首页</view>
			</view>
			<view class="action text-gray add-action" @click="navChange('publish', $event)">
				<button class="cu-btn cuIcon-add shadow"
					:class="PageCur=='publish'?'bg-green':'text-gray'"></button>
				<view :class="PageCur=='publish'?'text-green':''">发布</view>
			</view>
			<view class="action text-green" @click="navChange('mine', $event)">
				<view :class="PageCur=='mine'?'cuIcon-myfill':'cuIcon-my'"></view>
				<view :class="PageCur=='mine'?'':'text-gray'">我的</view>
			</view>
		</view>
	</view>
</template>

<script>
	import home from '../home/home.vue'
	import publish from '../publish/publish.vue'
	import mine from '../mine/mine.vue'
	export default {
		components:{
			home,
			publish,
			mine
		},
		data() {
			return {
				PageCur: 'home'
			}
		},
		methods: {
			navChange: function(e, event) {
				this.PageCur = e
			}
		}
	}
</script>

<style>
</style>
